package chapter_eleven.text11_6demo6;

/**
 * Data time:2021/10/19 16:47
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
public class ButtonControler extends AbstractControler {

    public ButtonControler(String name) {
        this.name = name;
    }

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public void add(AbstractControler control) {
        System.out.println("对不起，不支持该方法！");
    }

    public void remove(AbstractControler control) {
        System.out.println("对不起，不支持该方法！");
    }

    public AbstractControler getChild(int i) {
        System.out.println("对不起，不支持该方法！");
        return null;
    }

    public void designControl() {
        //模拟设计控件
        System.out.println("----设计一个'" + name + "'控件");
    }
}
